package Day15.poly_.six;

/**
 * @author HYHwtx
 * @version 1.0
 * @date 2022/2/22 16:59
 */
public class PersonTest {
    public static void main(String[] args) {
        Person[] person = new Person[5];
        person[0] = new Person("张三", 45);
        person[1] = new Student("李四", 36,25);
        person[2] = new Student("王五", 39,89);
        person[3] = new Teacher("二哈", 75,4589.5);
        person[4] = new Teacher("拉布拉多", 25,9678);
        for (int i = 0; i < person.length; i++) {
            System.out.println(person[i].say());
        }

    }
}
